home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak Vol C-14
/
Vol C-14.iso
/
games
/
sheepsho.swf
/
scripts
/
frame_253
/
DoAction.as
Wrap
Text File
|
2012-04-23
|
2KB
|
56 lines
setProperty("/cross", _visible, 0);
marginerror = garfieldscale * 0.7;
garfieldtempx = garfieldx;
garfieldtempy = garfieldy;
garminx = garfieldx - marginerror;
garmaxx = garfieldx + marginerror;
garminy = garfieldy - marginerror / 2;
garmaxy = garfieldy + marginerror / 2;
if(buttonmovie2.hitTest(_root["obstacle" + _root.choose].hitarea) and hitobsok == 1)
{
setProperty("/hitpoof", _visible, 1);
setProperty("/buttonmovie2", _visible, 0);
setProperty("/hitpoof", _X, obstaclex);
setProperty("/hitpoof", _Y, 224);
setProperty("/hitpoof", _xscale, 75);
setProperty("/hitpoof", _yscale, 75);
hitobsok = 0;
tellTarget("/hitpoof")
{
gotoAndPlay(2);
}
tellTarget("_root.obstacle" + _root.choose)
{
gotoAndPlay(1);
}
}
else if(crossx >= garminx and crossx <= garmaxx and crossy >= garminy and crossy <= garmaxy)
{
hit = "Hit";
setProperty("/hitpoof", _visible, 1);
setProperty("/buttonmovie2", _visible, 0);
setProperty("/hitpoof", _X, tempx);
setProperty("/hitpoof", _Y, tempy);
setProperty("/hitpoof", _xscale, scalemovie);
setProperty("/hitpoof", _yscale, scalemovie);
tellTarget("/hitpoof")
{
gotoAndPlay(2);
}
score += 1;
}
else
{
hit = "Miss";
setProperty("/sheepfall", _visible, 1);
setProperty("/buttonmovie2", _visible, 0);
setProperty("/sheepfall", _X, tempx);
setProperty("/sheepfall", _Y, tempy);
setProperty("/sheepfall", _xscale, scalemovie);
setProperty("/sheepfall", _yscale, scalemovie);
tellTarget("/sheepfall")
{
gotoAndPlay(2);
}
}